package com.app.mymusic.ui.charts;

import com.app.mymusic.model.Songs;

/**
 * Created by Administrator on 2016-12-7.
 */

public class ChartsPresenter {
    private ChartsActivity a;
    private ChartsModel chartsModel;
    public ChartsPresenter(ChartsActivity a) {
        this.a=a;
        chartsModel=new ChartsModel();
    }
    public void getCharts(String type,String offset){
        chartsModel.getCharts("","", new ChartsCallback() {
            @Override
            public void success(Songs songs) {
                a.showRes(songs);
            }

            @Override
            public void error() {

            }
        });
    };

    public void onDestroy() {
        a=null;
    }

    public interface ChartsCallback{
        void success(Songs songs);
        void error();
    }
}
